const defaultState = {
  schema: {
    type: 'page',
    title: 'Hello world',
    body: '初始页面',
  },
};

export default {
  namespace: 'global',
  state: defaultState,
  reducers: {
    resetState(state: any) {
      return {
        ...state,
        ...defaultState,
      };
    },
    updateState(state: any, { payload }: any) {
      return {
        ...state,
        ...payload,
      };
    },
  },
};
